package com.inspection.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum UserStatusEnum {
    NORMAL(1, "正常"),
    FORBIDDEN(-1, "禁用");

    private int status;

    private String msg;


    public static UserStatusEnum get(Integer status) {
        UserStatusEnum[] values = UserStatusEnum.values();
        for (UserStatusEnum value : values) {
            if (value.status == status) {
                return value;
            }
        }
        return null;
    }
}
